﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZF.BLL;
using GCELibrary.Current;
namespace ZF.WS.expert
{
    public partial class article : BLL.Page.PageBase
    {
        public Model.E_Article Article { get; set; }
        [PageArgument(Key = "aid", CanNull = false)]
        public int id { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            using (var dc = SiteInfo.CreateDBDataContext())
            {
                Article = dc.E_Article.FirstOrDefault(p => p.ArticleId == id);
                if (Article == null)
                {
                    throw WarnFactory.CreateWarn(WarnCode.ReocrdNoFind);
                }
                var m = Article.US_Member;
                Article.Hits++;
                dc.SubmitChanges();
            }
        }
    }
}
 
